package krypto.exercise;

import java.math.BigInteger;

public class W6e10 {

	public static void main(String[] args) {
		BigInteger x,y;

		//Exhaustive search
		for (int i = 1; i <= 23; i++) {
			x = BigInteger.valueOf(i);
			y = BigInteger.valueOf(2).modPow(x, BigInteger.valueOf(47));

			if (y.equals(BigInteger.valueOf(36))) {
				System.out.println("Bingo - x=" + x + " y=" + y);
			} else {
				System.out.println("----- - x=" + x + " y=" + y);
			}
		}
	}
}
